package com.fenghongzhang.day012;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;

/**
 * 2 广播接收者
 */
public class MyReceiver extends BroadcastReceiver {
    private static final String TAG = "MyReceiver";

    @Override
    public void onReceive(Context context, Intent intent) {
        Log.i(TAG, "onReceive: ");

        Bundle bundleExtra = intent.getExtras();
        String name = bundleExtra.getString("name");
        Log.i(TAG, "onReceive: "+name);

    }
}
